package com.wlf;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @BelongsProject: my-product
 * @BelongsPackage: com.wlf
 * @Author: wanglf
 * @CreateTime: 2023-05-16  15:16
 * @Description:
 * @Version: 1.0
 */
public class ProfileMain {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
        context.getEnvironment().setActiveProfiles("prd");
        context.register(ProfileConfiguration.class);
        context.refresh();
        ProfileService bean = context.getBean(ProfileService.class);
        System.out.println(bean);
    }
}